In enable_ats_device, it should enable ATS if find matched atsr unit
for a device, and don't enable it if no matched atsr unit. But current
code does contrarily. This patch fixes it.
Signed-off-by: Weidong Han <Weidong.han@intel.com>
u16 queue_depth;
int pos;
- if ( acpi_find_matched_atsr_unit(bus, devfn) )
+ if ( !acpi_find_matched_atsr_unit(bus, devfn) )
+ {
+ dprintk(XENLOG_WARNING VTDPREFIX,
+ "cannot find matched atsr for %x:%x.%x\n",
+ bus, PCI_SLOT(devfn), PCI_FUNC(devfn));
return 0;
+ }
pos = pci_find_ext_capability(seg, bus, devfn, PCI_EXT_CAP_ID_ATS);
if ( !pos )